#pragma once

template<typename T>
class CBaseLocker
{
public:
	CBaseLocker(T * t) : m_pLocker(t)
	{
		if (m_pLocker) m_pLocker->Enter();
    }

    ~CBaseLocker(void)
    {
        if (m_pLocker) m_pLocker->Leave();
    }

private:
    T * m_pLocker;
};
